﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="modify.ascx.cs" Inherits="ascx_modify" %>
<%-- <p>
 &nbsp;&nbsp;&nbsp;&nbsp;
 <asp:Label ID="Label1" runat="server" Font-Bold="True" Font-Names="隶书" Font-Size="X-Large" ForeColor="Black" Text="图书大分类"></asp:Label>

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<asp:Label ID="Label2" runat="server" Font-Bold="True" Font-Names="隶书" Font-Size="X-Large" ForeColor="Black" Text="图书小分类"></asp:Label>

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

<asp:Label ID="Label4" runat="server" Font-Bold="True" Font-Names="隶书" Font-Size="X-Large" ForeColor="Black" Text="图书列表"></asp:Label>
</p>--%>
<asp:Panel ID="Panel5" runat="server">
<asp:Label ID="Label8" runat="server" Font-Bold="True" Font-Names="隶书" Font-Size="X-Large" ForeColor="Black" Text="分类图书管理"></asp:Label>
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
<table>
    <tr>
        <td>
            <asp:UpdatePanel ID="UpdatePanel1" runat="server">
            <ContentTemplate>
            <asp:ListBox ID="LB_superType" runat="server" DataSourceID="LinqDataSource1" DataTextField="superTypeName"
                DataValueField="superTypeId" Height="265px" Width="242px" AutoPostBack="True"
                OnSelectedIndexChanged="LB_superType_SelectedIndexChanged"></asp:ListBox>
            </ContentTemplate>
            </asp:UpdatePanel>
        </td>
        <td>
            <asp:UpdatePanel ID="UpdatePanel2" runat="server">
            <ContentTemplate>
            <asp:ListBox ID="LB_subType" runat="server" Height="265px" Width="246px" OnSelectedIndexChanged="LB_subType_SelectedIndexChanged"
                AutoPostBack="True"></asp:ListBox>
            </ContentTemplate>
            </asp:UpdatePanel>
        </td>
        <td>
            <asp:UpdatePanel ID="UpdatePanel3" runat="server">
            <ContentTemplate>
             <asp:ListBox ID="LB_book" runat="server" Height="265px" Width="246px" OnSelectedIndexChanged="LB_book_SelectedIndexChanged"
                AutoPostBack="True"></asp:ListBox>
            </ContentTemplate>
            </asp:UpdatePanel>
        </td>
    </tr>
</table>
</asp:Panel>
<br />
<asp:Panel ID="Panel4" runat="server">
    <tr>
        <td>
            <asp:Button ID="BTN_deleteSuperType" runat="server" BorderWidth="1px" Height="30px"
                Text="删除大分类" OnClick="BTN_deleteSuperType_Click" />
        </td>
        <td>
            &nbsp;
            <asp:Button ID="BTN_deleteSupType" runat="server" BorderWidth="1px" Height="30px"
                Text="删除小分类" OnClick="BTN_deleteSupType_Click" />
        </td>
        <td>
            &nbsp;
            <asp:Button ID="BTN_deleteBook" runat="server" BorderWidth="1px" Height="30px" Text="删除图书"
                OnClick="BTN_deleteBook_Click" Width="87px" />
        </td>
    </tr>
    &nbsp;&nbsp;&nbsp;
    </asp:Panel>
<asp:LinqDataSource ID="LinqDataSource1" runat="server" ContextTypeName="DataTableDataContext"
    EntityTypeName="" Select="new (superTypeName, superTypeId)" TableName="SuperType">
</asp:LinqDataSource>

<p>
    <asp:UpdatePanel ID="UpdatePanel4" runat="server">
    <ContentTemplate>
     <asp:DataList ID="DataList1" runat="server" BackColor="#DEBA84" BorderColor="#DEBA84"
        BorderStyle="None" BorderWidth="1px" CellPadding="3" CellSpacing="2" GridLines="Both"
        DataKeyField="bookId" Width="100%" OnItemCommand="DataList1_ItemCommand" OnSelectedIndexChanged="DataList1_SelectedIndexChanged">
        <FooterStyle BackColor="#F7DFB5" ForeColor="#8C4510" />
        <SelectedItemStyle BackColor="#738A9C" Font-Bold="True" ForeColor="White" />
        <ItemStyle BackColor="#FFF7E7" ForeColor="#8C4510" />
        <HeaderStyle BackColor="#A55129" Font-Bold="True" ForeColor="White" />
        <ItemTemplate>
            <table width="100%">
                <tr>
                    <td align="left" rowspan="4">
                        <asp:Image ID="Image1" runat="server" Height="100px" ImageUrl='<%#DataBinder.Eval(Container.DataItem,"smallImg")%>' />
                    </td>
                    <td align="left">
                        <asp:Label ID="Label2" runat="server" Font-Bold="True" Font-Names="隶书" ForeColor="Red"
                            Text="书名："></asp:Label>
                    </td>
                    <td align="left">
                        <asp:Label ID="Label5" runat="server" Text='<%#DataBinder.Eval(Container.DataItem,"bookName")%>'></asp:Label>
                    </td>
                    <td align="left">
                        <asp:Label ID="Label3" runat="server" Font-Bold="True" Font-Names="隶书" ForeColor="Red"
                            Text="价格："></asp:Label>
                    </td>
                    <td align="left">
                        <asp:Label ID="Label6" runat="server" Text='<%# DataBinder.Eval(Container.DataItem,"marketPrice") %>'></asp:Label>
                    </td>
                    <td align="left">
                        <asp:Label ID="Label7" runat="server" Font-Bold="True" Font-Names="隶书" ForeColor="Red"
                            Text="库存量："></asp:Label>
                    </td>
                    <td align="left">
                        <asp:Label ID="Label9" runat="server" Text='<%#DataBinder.Eval(Container.DataItem,"inventory")%>'></asp:Label>
                    </td>
                </tr>
            </table>
        </ItemTemplate>
    </asp:DataList>
    </ContentTemplate>
    </asp:UpdatePanel>

   
</p>

<p>
<asp:Button ID="BTN_modefiy" runat="server" Text="编辑图书信息" BorderWidth="1px" 
        Font-Names="Arial Black" Height="33px" onclick="BTN_modefiy_Click" />
</p>

<asp:Panel ID="Panel3" runat="server" Height="38px">

    &nbsp;
    <asp:Label ID="Label20" runat="server" Text="增加大分类"></asp:Label>
    <asp:TextBox ID="TB_superIncrease" runat="server" style="margin-left: 0px" 
        ValidationGroup="increaseSuperType" Width="170px"></asp:TextBox>
    <asp:RequiredFieldValidator ID="RequiredFieldValidator7" runat="server" 
        ControlToValidate="TB_superIncrease" ErrorMessage="不能为空！" 
        ValidationGroup="increaseSuperType"></asp:RequiredFieldValidator>
    &nbsp;&nbsp;&nbsp;<asp:Button ID="BTN_increaseSuperType" runat="server" Text="提交" BorderWidth="1px"
        Font-Names="Arial Black" Height="30px" 
        OnClick="BTN_increaseSuperType_Click" ValidationGroup="increaseSuperType" 
        Width="70px" />
   
    <br />
   
    </asp:Panel>
     <asp:UpdatePanel ID="UpdatePanel5" runat="server" Height="41px">
        <ContentTemplate> 
    &nbsp;
    <asp:Label ID="Label21" runat="server" Text="增加小分类"></asp:Label>
            <asp:TextBox ID="TB_subIncrease" runat="server" 
        ValidationGroup="increaseSubType" Width="174px"></asp:TextBox>
        <asp:RequiredFieldValidator ID="RequiredFieldValidator6" runat="server" 
            ControlToValidate="TB_subIncrease" ErrorMessage="不能为空！" 
            ValidationGroup="increaseSubType"></asp:RequiredFieldValidator>
            &nbsp;<asp:Label ID="Label24" runat="server" Text="所属大分类"></asp:Label>
        
        
        &nbsp;<asp:TextBox ID="TB_sub_superType" runat="server" ReadOnly="True" 
         style="margin-left: 0px" ValidationGroup="increaseSubType" Width="150px"></asp:TextBox>
        
        
            <asp:Button ID="BTN_increaseSubType" runat="server" Text="提交" BorderWidth="1px"
        Font-Names="Arial Black" Height="30px" OnClick="BTN_increaseSubType_Click" 
        ValidationGroup="increaseSubType" Width="66px" />&nbsp;<asp:RequiredFieldValidator 
            ID="RequiredFieldValidator4" runat="server" 
            ControlToValidate="TB_sub_superType" ErrorMessage="在列表框中选择图书大分类！" 
            ValidationGroup="increaseSubType"></asp:RequiredFieldValidator>
        &nbsp;
    <br />
    <br />
    <br />
</ContentTemplate>
        </asp:UpdatePanel>
<asp:Panel ID="Panel1" runat="server" Height="576px">
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    <br />
   <asp:Label ID="Label1" runat="server" Font-Bold="True" Font-Names="隶书" Font-Size="X-Large" ForeColor="Black" Text="图书信息编辑"></asp:Label>
    <br />
    <br />
    &nbsp; &nbsp;<asp:Label ID="Label10" runat="server" Text="书名"></asp:Label>
    &nbsp;&nbsp;&nbsp;&nbsp;<asp:TextBox ID="TB_name" runat="server" ValidationGroup="increaseBook"></asp:TextBox>
    &nbsp;&nbsp;&nbsp;&nbsp;<asp:Label ID="Label11" runat="server" Text="作者"></asp:Label>
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    <asp:TextBox ID="TB_author" runat="server" ValidationGroup="increaseBook"></asp:TextBox>
    <br />
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" 
        ControlToValidate="TB_name" ErrorMessage="书名不能为空！" 
        ValidationGroup="increaseBook"></asp:RequiredFieldValidator>
    <br />
    &nbsp;<br />
    <br />
    &nbsp;
    <asp:Label ID="Label12" runat="server" Text="出版社"></asp:Label>
    &nbsp;&nbsp;&nbsp;
    <asp:TextBox ID="TB_publicher" runat="server" ValidationGroup="increaseBook"></asp:TextBox>
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    <asp:Label ID="Label13" runat="server" Text="ISBN"></asp:Label>
    &nbsp;&nbsp;
    <asp:TextBox ID="TB_ISBN" runat="server" ValidationGroup="increaseBook"></asp:TextBox>
    <br />
    <br />
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    <br />
    <br />
    &nbsp;
    <asp:Label ID="Label14" runat="server" Text="单价"></asp:Label>
    &nbsp;&nbsp;
    <asp:TextBox ID="TB_marketPrice" runat="server" Height="19px" 
        ValidationGroup="increaseBook"></asp:TextBox>
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    <asp:Label ID="Label15" runat="server" Text="库存量"></asp:Label>&nbsp;&nbsp;
    <asp:TextBox ID="TB_inventory" runat="server" ValidationGroup="increaseBook"></asp:TextBox>&nbsp;<br /> 
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" 
        ControlToValidate="TB_marketPrice" ErrorMessage="单价不能为空！" 
        ValidationGroup="increaseBook"></asp:RequiredFieldValidator>
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" 
        ControlToValidate="TB_inventory" ErrorMessage="库存不能为空！" 
        ValidationGroup="increaseBook"></asp:RequiredFieldValidator>
    &nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    <asp:RangeValidator ID="RangeValidator2" runat="server" 
        ErrorMessage="单价必须为数字！" ControlToValidate="TB_marketPrice" 
        MaximumValue="10000" MinimumValue="0" Type="Double" 
        ValidationGroup="increaseBook"></asp:RangeValidator>
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    <asp:RangeValidator ID="RangeValidator3" runat="server" 
        ControlToValidate="TB_inventory" ErrorMessage="库存量必须为数字!" 
        MaximumValue="10000" MinimumValue="0" Type="Integer" 
        ValidationGroup="increaseBook"></asp:RangeValidator>
    <br />
    <br />
    &nbsp;&nbsp;&nbsp;
    <asp:UpdatePanel ID="UpdatePanel6" runat="server">
    <ContentTemplate>
    <asp:Label ID="Label22" runat="server" Text="所属大分类"></asp:Label>
    &nbsp;&nbsp;&nbsp;<asp:TextBox ID="TB_SuperType" runat="server" ReadOnly="True" 
        ValidationGroup="increaseBook"></asp:TextBox>
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    <asp:Label ID="Label23" runat="server" Text="所属小分类"></asp:Label>
    &nbsp;&nbsp;
    <asp:TextBox ID="TB_subType" runat="server" ReadOnly="True" 
        ValidationGroup="increaseBook" Width="120px"></asp:TextBox>
    <asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server" 
        ControlToValidate="TB_subType" ErrorMessage="在列表框中选择图书小分类！" 
        ValidationGroup="increaseBook"></asp:RequiredFieldValidator>
    </ContentTemplate>
    </asp:UpdatePanel>
    
    <br />
    <br />
    
    <asp:Label ID="Label16" runat="server" Text="简单介绍"></asp:Label>
    <br />
    <asp:TextBox ID="TB_introduce" runat="server" Height="83px" Width="900px" 
        ValidationGroup="increaseBook"></asp:TextBox>&nbsp;
    <br />
  
    
    
    <br />
     &nbsp;&nbsp;<asp:Label ID="Label25" runat="server" Text="选择图片"></asp:Label>
    &nbsp;&nbsp;
    <asp:FileUpload ID="FileUpload1" runat="server" Height="20px" Width="226px" />
     &nbsp;&nbsp;&nbsp;<asp:RequiredFieldValidator ID="RequiredFieldValidator8" runat="server" 
        ControlToValidate="FileUpload1" ErrorMessage="必须选择一张图片！" 
        ValidationGroup="increaseBook"></asp:RequiredFieldValidator>
    &nbsp;&nbsp;
    <br />
    <br />
   &nbsp;&nbsp;
    <asp:Button ID="BTN_book" runat="server" BorderWidth="1px" 
        Font-Names="Arial Black" Height="30px" OnClick="BTN_book_Click" Text="提交" 
        ValidationGroup="increaseBook" Width="69px" />

</asp:Panel>

<asp:Panel ID="Panel2" runat="server" style="margin-top: 64px">
<asp:UpdatePanel ID="UpdatePanel7" runat="server">
<ContentTemplate>
   <asp:Label ID="Label4" runat="server" Font-Bold="True" Font-Names="隶书" Font-Size="X-Large" ForeColor="Black" Text="公有属性设置"></asp:Label>  
    <br />
    <br />
    <br />
    &nbsp;&nbsp;
    <asp:Label ID="Label19" runat="server" Text="公共折扣"></asp:Label>
    &nbsp;&nbsp;&nbsp;
    <asp:DropDownList ID="DL_publicDiscount" runat="server" AutoPostBack="True" 
        onselectedindexchanged="DL_publicDiscount_SelectedIndexChanged">
        <asp:ListItem Value="100">100%</asp:ListItem>
        <asp:ListItem Selected="True" Value="90">90%</asp:ListItem>
        <asp:ListItem Value="80">80%</asp:ListItem>
        <asp:ListItem Value="70">70%</asp:ListItem>
        <asp:ListItem Value="60">60%</asp:ListItem>
        <asp:ListItem Value="50">50%</asp:ListItem>
        <asp:ListItem Value="40">40%</asp:ListItem>
        <asp:ListItem Value="30">30%</asp:ListItem>
        <asp:ListItem Value="20">20%</asp:ListItem>
        <asp:ListItem Value="10">10%</asp:ListItem>
        <asp:ListItem Value="0">免费</asp:ListItem>
    </asp:DropDownList>
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    <asp:Label ID="Label18" runat="server" Text="是否启用"></asp:Label>&nbsp;&nbsp;&nbsp;
    <asp:CheckBox ID="CB_isPublicDiscount" runat="server" AutoPostBack="True" 
        oncheckedchanged="CB_isPublicDiscount_CheckedChanged" />
        </ContentTemplate>
</asp:UpdatePanel>
</asp:Panel>




